package yang.simpleMain.rpcStudy.rmi.server;

import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;

public class RmiServer {
	
	public static void main(String[] args) throws RemoteException, MalformedURLException {
		PersonService service = new PersonServiceImpl();
		
		// 注册通讯端口
		LocateRegistry.createRegistry(6600);
		// 注册通讯路径
		Naming.rebind("rmi://127.0.0.1:6600/PersonService", service);
		
		System.out.println("Service Start");
	}

}
